package com.meida.student.app.common.handler;


import com.meida.common.base.entity.EntityMap;
import com.meida.common.mybatis.interceptor.PageInterceptor;
import com.meida.common.mybatis.model.PageParams;
import com.meida.common.mybatis.query.CriteriaQuery;
import com.meida.module.bus.client.entity.BusInternationalCode;
import org.springframework.stereotype.Component;

/**
 * 国际区号list扩展
 *
 * @author zyf
 */
@Component
public class BusInternationalCodePageListHandler implements PageInterceptor<BusInternationalCode> {


    @Override
    public void prepare(CriteriaQuery<BusInternationalCode> cq, PageParams pageParams, EntityMap params) {
        cq.clear();
        cq.select(BusInternationalCode.class, "internationalId", "internationaName", "internationaNo");
        cq.eq(BusInternationalCode.class, "internationaState", 1);
        cq.orderByAsc("sort");
    }
}
